#pragma once

#include <MyFC/ScrollBox.h>
#include "DLL.h"

namespace My {

class ListScrollBox;

class TestHeader : public Widget {
public:
	TestHeader(ListScrollBox &);
public:
	int GetHeight() const
		{ return 25; }
	int GetTotalWidth() const
		{ return 300; }
	virtual void HandlePaint(CDC *, const CRect &);
private:
	ListScrollBox &	m_Owner;
};

class TestList : public Widget {
public:
	TestList(ListScrollBox &);
public:
	int GetTotalWidth() const
		{ return 300; }
	int GetTotalHeight() const
		{ return 500; }
	virtual void HandlePaint(CDC *, const CRect &);
private:
	ListScrollBox &	m_Owner;
};

class DLL_API ListScrollBox : 
	public virtual Widget,
	protected ScrollBox 
{
public:
	ListScrollBox();
public:
	using ScrollBox::GetOffset;
	using ScrollBox::GetHorzBar;
	using ScrollBox::GetVertBar;
public:
	virtual CRect Bounds() const
		{ return Widget::Bounds(); }
	virtual bool Visible() const
		{ return Widget::Visible(); }
	virtual const CFont * Font() const
		{ return Widget::Font(); }
protected:
	virtual void LayoutControls();
	virtual CSize GetPreferredContentSize() const;
private:
	TestHeader	m_Header;
	TestList	m_List;
};

} // My